package pl.edu.pw.polygen.modeler.client.object.listener;

import pl.edu.pw.polygen.modeler.client.object.IPolygenObject;
import pl.edu.pw.polygen.modeler.client.workspace.IWorkspace;

import com.google.gwt.event.dom.client.MouseDownEvent;
import com.google.gwt.event.dom.client.MouseOverEvent;


public class LockedVertexListener extends BaseObjectListener{

	@Override
	public void onMouseOver(MouseOverEvent event, IPolygenObject polygenObject) {
		super.onMouseOver(event, polygenObject);
		polygenObject.over();
	}

	@Override
	public void onMouseDown(MouseDownEvent event, IPolygenObject polygenObject) {
		super.onMouseDown(event, polygenObject);
		IWorkspace context = polygenObject.getContext();
		context.unselectAll();
		context.setMouseDownCatch(true);
		polygenObject.select();
	}
	
	
	

}
